package modelosDeParcial;


import junit.framework.Assert;

import org.junit.Test;

public class CalculadoraDivisorTest {

	@Test
	public void testDividirNumeroConPuntoFlotante(){
		CalculadoraDivisor calc = new CalculadoraDivisor();
		System.out.println(calc.calcularDivisionPorEntero(17, 3));

		Assert.assertEquals(5, calc.calcularDivisionPorEntero(17, 3));
	}
	
	@Test
	public void testDividirNumeroConEnteros(){
		CalculadoraDivisor calc = new CalculadoraDivisor();
		System.out.println(calc.calcularDivisionPorEntero(12, 3));
		
		Assert.assertEquals(4, calc.calcularDivisionPorEntero(12, 3));
	}
	@Test
	public void testDividirPor1(){
		CalculadoraDivisor calc = new CalculadoraDivisor();
		System.out.println(calc.calcularDivisionPorEntero(12, 1));
		
		Assert.assertEquals(12, calc.calcularDivisionPorEntero(12, 1));
	}
	@Test
	public void testDividir0PorXNumero(){
		CalculadoraDivisor calc = new CalculadoraDivisor();
		System.out.println(calc.calcularDivisionPorEntero(0, 10));
		
		Assert.assertEquals(0, calc.calcularDivisionPorEntero(0, 10));
	}
	@Test(expected = Error.class)
	public void testDividirXpor0(){
		CalculadoraDivisor calc = new CalculadoraDivisor();
		calc.calcularDivisionPorEntero(10, 0);
	}
}
